Fix page_to_phys() macro as suggested by Gerd.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 8 Aug 2005 17:00:21 +0000 (17:00 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 8 Aug 2005 17:00:21 +0000 (17:00 +0000)
xen/include/asm-x86/io.h

index 2b733e4e865ab7574d76fa8294f0aea4e91d66aa..8f8abf65c5152ae9e0f0aedeaad2e5ac06b25572 100644 (file)
@@ -2,6 +2,7 @@
 #define _ASM_IO_H
 
 #include <xen/config.h>
+#include <xen/types.h>
 #include <asm/page.h>
 
 #define IO_SPACE_LIMIT 0xffff
@@ -45,11 +46,7 @@ static inline void * phys_to_virt(unsigned long address)
 /*
  * Change "struct pfn_info" to physical address.
  */
-#ifdef CONFIG_HIGHMEM64G
-#define page_to_phys(page)  ((u64)(page - frame_table) << PAGE_SHIFT)
-#else
-#define page_to_phys(page)  ((page - frame_table) << PAGE_SHIFT)
-#endif
+#define page_to_phys(page)  ((physaddr_t)(page - frame_table) << PAGE_SHIFT)
 
 #define page_to_pfn(_page)  ((unsigned long)((_page) - frame_table))
 #define page_to_virt(_page) phys_to_virt(page_to_phys(_page))